#ifndef __I2C_Bus_H 
#define __I2C_Bus_H 

/* Includes ------------------------------------------------------------------*/ 
#include "stm32f10x.h" 

#define SCL_H         GPIOB->BSRR = GPIO_Pin_6 
#define SCL_L         GPIOB->BRR  = GPIO_Pin_6  
    
#define SDA_H         GPIOB->BSRR = GPIO_Pin_7 
#define SDA_L         GPIOB->BRR  = GPIO_Pin_7 

#define SDA_read      (GPIOB->IDR  & GPIO_Pin_7) 

#ifndef	TRUE
	#define TRUE 	1
#endif
#ifndef FALSE
	#define FALSE 	0
#endif


void I2C_delay(u8 nus); 
u8 I2C_Start(void); 
void I2C_Stop(void); 
void I2C_Ack(void); 
void I2C_NoAck(void); 
u8 I2C_WaitAck(void); 
u8 I2C_SendByte(u8 SendByte); 
u8 I2C_ReceiveByte(u8 last_char); 

#endif   
